Skip to content

Add "returnOnlyRoleNames" option to Role.getRoles [2.x]#2993

Merged
bajtos merged 1 commit into
2.xfrom
backport/returnOnlyRoleNames
Nov 30, 2016
Merged

Add "returnOnlyRoleNames" option to Role.getRoles [2.x]#2993
bajtos merged 1 commit into
2.xfrom
backport/returnOnlyRoleNames

Conversation

@bajtos

@bajtos bajtos commented Nov 30, 2016

Copy link
Copy Markdown
Member

Currently the return type of Role.getRoles() method is inconsistent: role names are returned for smart roles and role ids are returned for static roles (configured through user-role mapping).

This commit adds a new option to Role.getRoles() allowing the caller to request role names to be returned for all types of roles.

Backport #2975

cc @ebarault

Currently the return type of Role.getRoles() method is inconsistent:
role names are returned for smart roles and role ids are returned for
static roles (configured through user-role mapping).

This commit adds a new option to Role.getRoles() allowing the caller
to request role names to be returned for all types of roles.
@bajtos bajtos self-assigned this Nov 30, 2016
@bajtos bajtos added the #review label Nov 30, 2016
@bajtos
bajtos merged commit 63df861 into 2.x Nov 30, 2016
@bajtos
bajtos deleted the backport/returnOnlyRoleNames branch November 30, 2016 16:23
@bajtos bajtos removed the #review label Nov 30, 2016
@bajtos bajtos changed the title Add "returnOnlyRoleNames" option to Role.getRoles Add "returnOnlyRoleNames" option to Role.getRoles [2.x] Nov 30, 2016
@ebarault

ebarault commented Dec 2, 2016

Copy link
Copy Markdown
Contributor

@bajtos : we should update the doc to reflect this option, this should land in the api doc, here. but also we could update the security section to add more details and examples on Role, ACL, AccessTokens methods ?

@bajtos

bajtos commented Dec 5, 2016

Copy link
Copy Markdown
Member Author

@ebarault sure, updating docs is a good idea! Would you mind contributing those changes yourself?

(EDITED) API docs are generated from the jsdoc comments in the code. The section Role.getRoles() is generated from this comment. I guess I should have asked you to include the documentation changes in this pull request 😄

The content of "security section" can be edited here: https://github.com/strongloop/loopback.io/blob/gh-pages/pages/en/lb2/Authentication-authorization-and-permissions.md

@ebarault

ebarault commented Dec 5, 2016

Copy link
Copy Markdown
Contributor

@bajtos : sure, happy to help. I will propose additions in the coming days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants